<template>
    <div>
        <h1>小头爸爸</h1>
        <BigHeader @addItem="addItem"></BigHeader>
    </div>
</template>

<script>
import BigHeader from './BigHeader.vue';

export default{
    name:'',
    data(){
        return{
            list:[
                {name:'tom',age:20},
                {name:'jerry',age:22}
            ]
        }
    },
    components:{
        BigHeader,
    },
    computed:{

    },
    methods:{
        addItem(item){
            this.list.push(item);
            console.log(this.list);
        }
    }
}
</script>

<style lang="scss" scoped>

</style>